# 闭包形式的装饰器

def outer_fn(fn:callable):
    def inner_fn(name:str):
        print(f"Hello World from {name}!")
        # 执行被装饰的函数
        fn(name)
    return inner_fn

@outer_fn
def send(name:str):
    print(f"Send message from {name}")

send("Leslie")

# 被装饰的函数有参数时, 装饰器函数(闭包函数的内层也要有参数)